package com.diankangwo.dao.impl;

import org.springframework.stereotype.Repository;

import com.diankangwo.dao.QueryPaymentDAO;
import com.diankangwo.domain.QueryPayment;
import com.diankangwo.util.PageSupport;

@Repository
public class QueryPaymentDAOImpl extends BaseDaoImpl<QueryPayment> implements QueryPaymentDAO {

	@Override
	public QueryPayment findbyBillNo(String BillNo) {

		return findUniqueByProperty("billNo", BillNo);
	}

	@Override
	public PageSupport<QueryPayment> searchQuertPayment(int pageNo, String billNo) {
		return findPagination(" select q from QueryPayment q where q.billNo=? order by q.payTime desc", pageNo, 10, billNo);
	}

	@Override
	public PageSupport<QueryPayment> searchQuertPaymentN(int pageNo) {

		return findPagination("from QueryPayment q  where  q.iscreate=?  order by q.payTime desc", pageNo, 10, "yes");

	}
}

